package com.crealth.db;


import java.util.List;

import com.crealth.manager.MybatisManager;
import com.crealth.model.CreditReportModel;

public class CreditReportDb {
	
	public static void insertCreditReport(CreditReportModel creditReport ) {
		MybatisManager.creditReportMapper.insertCreditReport(creditReport);
	}
    
    public static Integer updateCreditReport(CreditReportModel creditReport) {
    	Integer res = MybatisManager.creditReportMapper.updateCreditReport(creditReport);
    	MybatisManager.commit();
    	
    	return res;
    }
    
    public static Integer updatePictureFile( int id, String pictureFileName) {
    	Integer res = MybatisManager.creditReportMapper.updatePictureFile(id, pictureFileName);
    	MybatisManager.commit();
    	
    	return res;
    }
    
    public static Integer updateCreditFile(int id, String creditFileName ) {
    	Integer res = MybatisManager.creditReportMapper.updateCreditFile(id, creditFileName);
    	MybatisManager.commit();
    	
    	return res;
    }
	
	public static List<CreditReportModel> selectCreditReportByCondition(String sqlCondition) {
		List<CreditReportModel> resultls = MybatisManager.creditReportMapper.selectCreditReportByCondition(sqlCondition);
		
		return resultls;
	}
	
	
	
}
